package com.nbsaas.boot.manufacturing.rest.convert;

import com.nbsaas.boot.manufacturing.data.entity.Material;
import com.nbsaas.boot.manufacturing.api.domain.request.MaterialRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 物料请求对象转换成实体对象
*/

public class MaterialEntityConvert  implements Converter<Material, MaterialRequest> {

    @Override
    public Material convert(MaterialRequest source) {
        Material result = new Material();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

